﻿#ifndef DEPT_H
#define DEPT_H

#include "qbaseentity.h"

class Dept : public QBaseEntity
{
    Q_OBJECT
    // 使用 Q_PROPERTY 宏定义属性
    Q_PROPERTY(uint64_t id READ getId WRITE setId)
    Q_PROPERTY(QString name READ getName WRITE setName)
    Q_PROPERTY(uint64_t pid READ getPid WRITE setPid)
    Q_PROPERTY(QString remark READ getRemark WRITE setRemark)
    Q_PROPERTY(int status READ getStatus WRITE setStatus)
public:
    explicit Dept(QObject *parent = nullptr);
    Dept(uint64_t id,QString name,uint64_t pid,QString remark,int status=1);
    ~Dept();

    uint64_t getId() const;
    void setId(const uint64_t &value);

    QString getName() const;
    void setName(const QString &value);

    uint64_t getPid() const;
    void setPid(const uint64_t &value);

    QString getRemark() const;
    void setRemark(const QString &value);

    int getStatus() const;
    void setStatus(int value);

private:
    uint64_t id; /**< ID */
    QString name; /**< 名称*/
    uint64_t pid; /**< 父级ID */
    QString remark;/**< 备注 */
    int status;/**< 状态*/
};

#endif // DEPT_H
